﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace MxWeiXinPF.BLL
{
    public partial class userbbs
    {
        private readonly MxWeiXinPF.DAL.userbbs dal;
        private readonly MxWeiXinPF.Model.siteconfig siteConfig = new MxWeiXinPF.BLL.siteconfig().loadConfig();

        public userbbs()
        {
            this.dal = new MxWeiXinPF.DAL.userbbs(this.siteConfig.sysdatabaseprefix);
        }

        public int Add(MxWeiXinPF.Model.userbbs model)
        {
            return this.dal.Add(model);
        }

        public int AddDetail(int id, string remarks, int uid, string openid, int shopid)
        {
            return this.dal.AddDetail(id, remarks, uid, openid, shopid);
        }

        public bool Delete(int id)
        {
            return this.dal.Delete(id);
        }

        public bool Exists(int id)
        {
            return this.dal.Exists(id);
        }

        public DataSet GetBBSDS(int id)
        {
            return this.dal.GetBBSDS(id);
        }

        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            return this.dal.GetList(Top, strWhere, filedOrder);
        }

        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            return this.dal.GetList(pageSize, pageIndex, strWhere, filedOrder, out recordCount);
        }

        public DataSet GetListByView(int Top, string strWhere, string filedOrder)
        {
            return this.dal.GetListByView(Top, strWhere, filedOrder);
        }

        public MxWeiXinPF.Model.userbbs GetModel(int id)
        {
            return this.dal.GetModel(id);
        }

        public bool Update(MxWeiXinPF.Model.userbbs model)
        {
            return this.dal.Update(model);
        }

        public bool UpdateBBS(int id)
        {
            return this.dal.UpdateBBS(id);
        }
    }
}
